package top.lishuoboy.boot03web.config;

import org.springframework.boot.web.servlet.filter.OrderedHiddenHttpMethodFilter;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.filter.HiddenHttpMethodFilter;

/**
 * @author lishuoboy
 * @date 2022/1/21 12:08
 */
@Configuration
public class HiddenHttpMethodFilterConfig {

    @Bean
    HiddenHttpMethodFilter hiddenHttpMethodFilter() {
        OrderedHiddenHttpMethodFilter orderedHiddenHttpMethodFilter = new OrderedHiddenHttpMethodFilter();
//        orderedHiddenHttpMethodFilter.setMethodParam("_m");  // restful 修改 默认的 _method
        return orderedHiddenHttpMethodFilter;
    }
}
